package chaozuo;

import bbb.*;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 18128
 * Date: 2023-09-25
 * Time: 21:45
 */
public class chaozhao implements ZG{
    public void work(Booklist bookl)
    {
//        System.out.println("查找图书");
        boolean flag=true;
        System.out.println("请输入你要查找的书名");
        Scanner sss=new Scanner(System.in);
        String nnn=sss.next();
        for (int i = 0; i < bookl.getNums(); i++) {
             book[] tmp=bookl.getBrr();
             if(nnn.equals(tmp[i].getName()))
             {
                 System.out.println(tmp[i]);
                 flag=false;
             }
        }
        if(flag)
        {
            System.out.println("没有这本书");
        }

    }

}
